package com.vfconsulting.common.action;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LogoutAction extends ActionSupport {

	private static final long serialVersionUID = 1L;

	public String execute() throws Exception{
			
    	try{
    		Map session = ActionContext.getContext().getSession();
    		session.remove("logged-in");
    		session.remove("usuario"); 		
    	}catch(Exception ex){
    		addActionMessage(ex.getMessage());
    		return ERROR;
    	}   
		
		return SUCCESS; 
	}
}
